//
//  BaseViewController.swift
//  FootballDataRecord
//
//  Created by Xx Jiang on 2020/1/8.
//  Copyright © 2020 Xx Jiang. All rights reserved.
//

import UIKit

class BaseViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = #colorLiteral(red: 0.1725490196, green: 0.1725490196, blue: 0.1725490196, alpha: 1)
       self.navigationController?.navigationBar.setBackgroundImage(UIImage.creatImage(with: #colorLiteral(red: 0.1411764706, green: 0.1411764706, blue: 0.137254902, alpha: 1)), for: .default)
        
       let btn = UIButton.init(type: .custom)
       btn.frame = CGRect.init(x: 0, y: 0, width: 30, height: 44)
       btn.setImage(UIImage.init(named: "icon_back"), for: .normal)
       btn.setTitle("   返回", for: .normal)
       btn.addTarget(self, action: #selector(back), for: .touchUpInside)
       self.navigationItem.leftBarButtonItem = UIBarButtonItem.init(customView: btn)
        

        
    }
    

    @objc func back()  {
        navigationController?.popViewController(animated: true)
    }

}
